using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ModelLayer
{
    [Table("Product")]
    public partial class Product : BaseEntity
    {
        public Product()
        {
            OrderDetails = new HashSet<OrderDetail>();
            UserCarts = new HashSet<UserCart>();
        }

        public long ProductId { get; set; }

        public long? CategoryId { get; set; }

        [StringLength(500)]
        public string ProductName { get; set; }

        [StringLength(1000)]
        public string Description { get; set; }

        [Column(TypeName = "numeric")]
        public decimal? Weight { get; set; }

        [Column(TypeName = "numeric")]
        public decimal? Price { get; set; }

        public string Image { get; set; }
        public virtual Category Category { get; set; }

        public virtual ICollection<OrderDetail> OrderDetails { get; set; }

        public virtual ICollection<UserCart> UserCarts { get; set; }
    }
}
